package ar.com.guess.image.enums;

/**
 * Distintos niveles en que se puede jugar.
 * @author Gatex
 *
 */
public enum Level {
	
	ONE("1"),TWO("2"),THREE("3");
	
	Level(String n){
		this.num = n;
	}
	String num;
	
	public String getNum() {
		return num;
	}
	
	public Level getNextLevel(){
		switch (this){
			case ONE: return TWO;
			case TWO: return THREE;
			default: return ONE;
		}
	}
	
	public static Level getLevel(String value){
		if (ONE.getNum().equals(value)){
			return Level.ONE;
		};
		if (TWO.getNum().equals(value)){
			return Level.TWO;
		};
		if (THREE.getNum().equals(value)){
			return Level.THREE;
		};
		throw new IllegalArgumentException();
	}
	
	

}
